import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'

export type AccountParams = BasicPageParams & {
  account?: string
  nickname?: string
}

export type AccountCreateParams = {
  username: string
  password: string
  email: string
  nickname: string
  role_id: number
  remark: string
  isUpdate: boolean
}

export type RoleCreateParams = {
  role_name: string
  role_value: string
  status: number
  remark: string
  menu: any
  isUpdate: boolean
}

export type MenuCreateParams = {
  menu_type: number
  menu_name: string
  path: string
  parent_id: number
  order_no: number
  status: number
  isUpdate: boolean
}

export type BannerCreateParams = {
  title: string
  image_url: string
  link: string
  status: number
  sort: number
}

export type RoleParams = {
  roleName?: string
  status?: string
}

export type RolePageParams = BasicPageParams & RoleParams

export type MenuParams = {
  menuName?: string
  status?: string
}

export interface AccountListItem {
  id: string
  username: string
  email: string
  nickname: string
  role: number
  status: number
  created_at: string
  description: string
}

export interface MenuListItem {
  id: string
  order_no: string
  created_at: string
  status: number
  icon: string
  component: string
  permission: string
}

export interface RoleListItem {
  id: string
  role_name: string
  role_value: string
  status: number
  order_no: string
  created_at: string
}

/**
 * @description: Request list return value
 */
export type AccountListGetResultModel = BasicFetchResult<AccountListItem>

export type MenuListGetResultModel = BasicFetchResult<MenuListItem>

export type RolePageListGetResultModel = BasicFetchResult<RoleListItem>

export type RoleListGetResultModel = RoleListItem[]
